﻿#include "computeralarmlog.h"
#include "alarmreq.h"

ComputerAlarmLog::ComputerAlarmLog()
{
    this->id = -1;
}

ComputerAlarmLog::ComputerAlarmLog( long computerId, QString &mode, int type, QString &comment, QString &time, bool isRead)
{
    this->id = -1;
    this->computerId = computerId;
    this->mode = mode;
    this->type = type;
    this->comment = comment;
    this->time = time;
    this->isRead = isRead;
}

QString ComputerAlarmLog::sayType()
{
    return AlarmReq::sayType(type);
}

QString ComputerAlarmLog::sayInfo()
{
    QString ret;
    ret += "告警模块：" + mode +  ",告警类型：" + sayType() + ",告警时间：" + time + "，告警信息：" + comment;
    return ret;
}


